<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <% var menu = [
                        {
                            icon: 'fa-cog',
                            title: '系统首页',
                            path: '/',
                            role: 1
                        },{
                            icon: 'fa-desktop',
                            title: '轮播图管理',
                            path: '/banner',
                            role: 1
                        },{
                            icon: 'fa-balance-scale',
                            title: '商品管理',
                            path: '/pro',
                            role: 1
                        },{
                            icon: 'fa-user',
                            title: '用户管理',
                            path: '/user',
                            role: 1
                        },{
                            icon: 'fa-shopping-cart',
                            title: '购物车管理',
                            path: '/cart',
                            role: 2
                        },{
                            icon: 'fa-list-alt',
                            title: '订单管理',
                            path: '/order',
                            role: 2
                        },{
                            icon: 'fa-bullhorn',
                            title: '活动管理',
                            path: '/activity',
                            role: 1
                        },{
                            icon: 'fa-commenting-o',
                            title: '消息管理',
                            path: '/message',
                            role: 1
                        }
                    ] %>

        <!-- Sidebar Menu -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">HEADER</li>
            <!-- Optionally, you can add icons to the links -->
            <% for (let i = 0; i < menu.length; i++) { %>
            <% if (role >= menu[i].role) { %>
            <li class="<%= activeIndex == i ? 'active' : '' %>">
                <a href="<%= menu[i].path %>">
                    <i class="fa <%= menu[i].icon %>"></i>
                    <span><%= menu[i].title %></span>
                </a>
            </li>
            <% } %>
            <% } %>
            <!-- <li class="active"><a href="#"><i class="fa fa-link"></i> <span>Link</span></a></li>
            <li><a href="#"><i class="fa fa-link"></i> <span>Another Link</span></a></li>
            <li class="treeview">
                <a href="#"><i class="fa fa-link"></i> <span>Multilevel</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="#">Link in level 2</a></li>
                    <li><a href="#">Link in level 2</a></li>
                </ul>
            </li> -->
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>